#coding:utf-8
'''
@author:        laohu
@date:          2021.07.15
@brief:         Qt组件通用功能
@note:          移植自QtOpenUtils
'''

from PySide6.QtGui import QColor
from PySide6.QtWidgets import *

def setShadow(w, blurRedius, dx, dy):
    shadow = QGraphicsDropShadowEffect()
    shadow.setBlurRadius(blurRedius)
    shadow.setColor(QColor(0, 0, 0, 160))
    shadow.setOffset(dx, dy)
    w.setGraphicsEffect(shadow)